My meme

There are four parts in my meme, I use cat images to mimic human’s mood changes before work and after work in a week.

Here is my meme

library(magick)

# Part 1
sleepycat <- image_read("images/sleepycat.jpg") %>%
  image_scale("300x300!") %>% # Resize the image
    image_border("#667C26", "5x5") # Add border to image
sleepycat

# Part 2
text1 <- image_blank(width = 300,
            height = 300,
            color = "#C9C0BB") %>% # Background color
  image_annotate(text = "Monday 7:59AM\n Before work", # Text content
                 color = "#FFFFFF", # Text color
                 size = 35, # Text size
                 font = "Impact", # Font
                 gravity = "center") %>% # Text position
     image_border("#667C26", "5x5") # Add border to image
text1

# Part 3
happycat <- image_read("images/happycat.jpg") %>%
  image_scale("300x300!") %>% # Resize the image
    image_border("#667C26", "5x5") # Add border to image
happycat


# Part 4
text2 <- image_blank(width = 300,
            height = 300,
            color = "#C0C099") %>% # Background color
  image_annotate(text = "Friday 4:59PM\n Back home", # Text content
                 color = "#FFFFFF", # Text color
                 size = 35, # Text size
                 font = "Impact", # Font
                 gravity = "center") %>% # Text position
    image_border("#667C26", "5x5") # Add border to image
text2

# Append text1 and text2 as first column
first_column <- image_append(c(text1, text2), stack = TRUE)

# Append two cats as second column
second_column <- image_append(c(sleepycat, happycat), stack = TRUE)


# Now append two column together
meme <- image_append(c(first_column, second_column)) %>%
  image_scale(500)
meme

# Save meme!
image_write(meme, "my_meme.png")

My animated GIF

I was inspired by ZooTopia, which is one of my favorite animation :D and I breakdown the clip into 10 images and then combine them together to make the classic sloth moment.

Here is my animation

library(magick)
# Read each frame
frame1 <- image_read("images/frames/01.jpg")
frame2 <- image_read("images/frames/02.jpg")
frame3 <- image_read("images/frames/03.jpg")
frame4 <- image_read("images/frames/04.jpg")
frame5 <- image_read("images/frames/05.jpg")
frame6 <- image_read("images/frames/06.jpg")
frame7 <- image_read("images/frames/07.jpg")
frame8 <- image_read("images/frames/08.jpg")
frame9 <- image_read("images/frames/09.jpg")
frame10 <- image_read("images/frames/10.jpg")


# Combine all the frames together
frames <- c(frame1, frame2, frame3, frame4, frame5, 
            frame6, frame7, frame8, frame9, frame10)

# This is a normal GIF
gif1 <- image_animate(frames, fps = 10)

# This is a gradient GIF
gif2 <- image_morph(frames) %>%
  image_animate(fps = 100)

image_write(gif2, "my_animation.gif")
h1{
  background: linear-gradient(to right, #045f5f, #99c68e);
      -webkit-text-fill-color:transparent;
      -webkit-background-clip:text;
  font-family: "Raleway", sans-serif;
  font-weight: bold;
}
h2 {
  background: linear-gradient(to right, #461b7e, #ffb5b5);
      -webkit-text-fill-color:transparent;
      -webkit-background-clip:text;
  font-family: "Raleway", sans-serif;
  font-weight: bold;
}

body{
  background-image: url("images/Background1.webp");
}

p {
  color: #254117;
  font-style: italic;
  background-color: #dbe9fa
}